﻿using System.Drawing;
using System;
using System.Collections;

namespace ConsoleApplication1
{
    class Program
    {
        static void Main(string[] args)
        {
            new ImageCheck(@"c:\Capture.png", @"c:\Capture2.png").Check();
        }
    }
    class ImageCheck
    {
        Bitmap b1, b2;

        public ImageCheck(Image a1, Image a2)
        {
            b1 = new Bitmap(a1);
            b2 = new Bitmap(b2);


        }

        public ImageCheck(string imagepath1, string imagepath2)
        {
            b2=new Bitmap(Image.FromFile(imagepath2));
            b1=new Bitmap(Image.FromFile(imagepath1));
        }

        public bool Check()
        {
            Color b2lefttopcolor = b2.GetPixel(0, 0);
            Color b2rightbottom = b2.GetPixel(b2.Width-1, b2.Height-1);
            ArrayList arrp=new ArrayList();

            for (int i = 0; i < b1.Width-b2.Width; i++)
            {
                for (int j = 0; j < b1.Height-b2.Height; j++)
                {
                    if (b1.GetPixel(i, j) == b2lefttopcolor)
                    {
                        if (b1.GetPixel(i + b2.Width, j + b2.Height)==b2rightbottom)
                        {

                            arrp.Add(new Point(i, j));
                        }
                    }
                }
            }

            Color[] b2wcolor = new Color[b2.Width];
            for (int i = 0; i < b2.Width; i++)
            {
                b2wcolor[i] = b2.GetPixel(i, 0);
            }
            Color[] b2hcolor = new Color[b2.Height];
            for (int j = 0; j < b2.Height; j++)
            {
                b2hcolor[j] = b2.GetPixel(0, j);
            }

            return false;
        }
    }



}
